<template>
  <div>
    <md-card>
      <md-card-header :data-background-color="dataBackgroundColor">
        <h5 class="title">申请人信息</h5>
      </md-card-header>

      <md-card-content>
        <div class="md-layout">

          <edit-item title="姓名*">
            <md-input v-model="formdata.indCustomerName"></md-input>
          </edit-item>

          <edit-item title="手机号码*">
            <md-input v-model="formdata.indMobile"></md-input>
          </edit-item>

          <edit-item title="证件类型*">
              <select v-model="formdata.indPaperType">
                <option value="1">身份证</option>
              </select>
          </edit-item>

          <edit-item title="证件号码*">
            <md-input v-model="formdata.indPaperNo" pattern="[0-9]{1,18}" v-on:invalid,input="setCustomValidity('格式不对')"></md-input>
          </edit-item>

          <edit-item title="身份证有效期">
            <md-input v-model="formdata.indPaperNoStartTime"></md-input> ~ <md-input v-model="formdata.indPaperNoEndTime"></md-input>
          </edit-item>

          <edit-item title="出生日期*">
            <md-input v-model="formdata.indBirthDay" type="date"></md-input>
          </edit-item>

          <label-item title ="年龄" v-model="formdata.indAge"></label-item>

          <edit-item title="性别" edittype="R">
            <input type="radio"  value="1" v-model="formdata.indSex">男
            <input type="radio"  value="0" v-model="formdata.indSex">女
          </edit-item>

          <edit-item title="民族" edittype="S">
            <select v-model="formdata.indNation">
              <option v-for="option in g_mlist('13')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="电子邮件">
            <md-input v-model="formdata.indEmail"></md-input>
          </edit-item>

          <edit-item title="学历" edittype="S">
            <select v-model="formdata.indEducation">
              <option v-for="option in g_mlist('12')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="婚姻状况" edittype="S">
            <select v-model="formdata.indMaritalStatus">
              <option v-for="option in g_mlist('11')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>
          <edit-item title="居住省市" edittype="S">
            <select v-model="formdata.indProvince">
              <option v-for="option in g_mlist('22')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
            <select v-model="formdata.indCity">
              <option v-for="option in g_mlist('29')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="居住地址">
            <md-input v-model="formdata.indAddress"></md-input>
          </edit-item>

          <edit-item title="家庭电话">
            <md-input v-model="formdata.indTelArea" style="width:30%;"></md-input> -
            <md-input v-model="formdata.indTel" style="width:50%;"></md-input>
          </edit-item>

          <edit-item title="居住年限">
            <md-input v-model="formdata.indResidentPeriod"></md-input>
          </edit-item>

          <edit-item title="户籍省市" edittype="S">
            <select v-model="formdata.indResidenceProvince">
              <option v-for="option in g_mlist('22')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
            <select v-model="formdata.indResidenceCity">
              <option v-for="option in g_mlist('29')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="住房所有权" edittype="S">
            <select v-model="formdata.indHouseOwnerShip">
              <option v-for="option in g_mlist('14')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="是否在职" edittype="R">
            <input type="radio"  value="1" v-model="formdata.indOntheJob">是
            <input type="radio"  value="0" v-model="formdata.indOntheJob">否
          </edit-item>

          <edit-item title="主要收入来源" edittype="S">
            <select v-model="formdata.indIncomeFlg">
              <option v-for="option in g_mlist('15')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="主要税后年收入">
            <md-input v-model="formdata.indMainIncome"></md-input>
          </edit-item>

          <edit-item title="其他税后年收入">
            <md-input v-model="formdata.indOtherIncome"></md-input>
          </edit-item>

          <edit-item title="工作单位属性" edittype="S">
            <select v-model="formdata.indEmployProperty">
              <option v-for="option in g_mlist('429')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="现工作单位名称">
            <md-input v-model="formdata.indWorkUnitName"></md-input>
          </edit-item>

          <edit-item title="单位电话">
            <md-input v-model="formdata.indWorkTelArea" style="width:20%;"></md-input> -
            <md-input v-model="formdata.indWorkTel" style="width:40%;"></md-input> *
            <md-input v-model="formdata.indWorkTelExt" style="width:20%;"></md-input>
          </edit-item>

          <edit-item title="工作单位省市" edittype="S">
            <select v-model="formdata.indWorkProvince">
              <option v-for="option in g_mlist('22')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
            <select v-model="formdata.indWorkCity">
              <option v-for="option in g_mlist('29')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="工作单位地址">
            <md-input v-model="formdata.indWorkAddress"></md-input>
          </edit-item>

          <edit-item title="本单位工作年限">
            <md-input v-model="formdata.indWorkPeriod"></md-input>
          </edit-item>

          <edit-item title="银行卡号 ">
            <md-input v-model="formdata.indBankAccount" readonly></md-input>
          </edit-item>

          <edit-item title="银行预留手机号 ">
            <md-input v-model="formdata.indBankMobile" readonly></md-input>
          </edit-item>

        </div>

      </md-card-content>
    </md-card>

    <md-card v-if="formdata.indMaritalStatus == '2'">
      <md-card-header :data-background-color="dataBackgroundColor">
        <h5 class="title">配偶信息</h5>
      </md-card-header>

      <md-card-content>
        <div class="md-layout">

          <edit-item title="配偶姓名">
            <md-input v-model="formdata.spoCustomerName"></md-input>
          </edit-item>

          <edit-item title="配偶手机号码">
            <md-input v-model="formdata.spoMobile"></md-input>
          </edit-item>

          <edit-item title="配偶证件类型">
            <select v-model="formdata.finCarBrandId">
              <option v-for="option in g_mlist('10')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="配偶证件号码">
            <md-input v-model="formdata.spoPaperNo"></md-input>
          </edit-item>

          <edit-item title="身份证有效期">
            <md-input v-model="formdata.spoPaperNoStartTime"></md-input> ~ <md-input v-model="formdata.spoPaperNoEndTime"></md-input>
          </edit-item>

          <edit-item title="配偶出生日期">
            <md-input v-model="formdata.spoBirthDay"></md-input>
          </edit-item>

          <label-item title ="配偶年龄" v-model="formdata.spoAge"></label-item>

          <edit-item title="性别" edittype="R">
            <input type="radio" id="sex_1" value="1" v-model="formdata.spoSex">男
            <input type="radio" id="sex_2" value="0" v-model="formdata.spoSex">女
          </edit-item>

          <edit-item title="配偶民族" edittype="S">
            <select v-model="formdata.spoNation">
              <option v-for="option in g_mlist('13')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="子女人数">
            <md-input v-model="formdata.spoChildNum"></md-input>
          </edit-item>

          <edit-item title="是否在职" edittype="R">
            <div style="margin-top:5px;">
            <input type="radio" id="finSecondhandFlg_1" value="1" v-model="formdata.spoOntheJob">是
            <input type="radio" id="finSecondhandFlg_0" value="0" v-model="formdata.spoOntheJob">否
            </div>
          </edit-item>

          <edit-item title="配偶主要税后年收入">
            <md-input v-model="formdata.spoMainIncome"></md-input>
          </edit-item>

          <edit-item title="工作单位属性" edittype="S">
            <select v-model="formdata.spoEmployProperty">
              <option v-for="option in g_mlist('429')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="配偶工作单位名称">
            <md-input v-model="formdata.spoWorkUnitName"></md-input>
          </edit-item>

          <edit-item title="配偶单位电话">
            <md-input v-model="formdata.spoWorkTelArea" style="width:20%;"></md-input> -
            <md-input v-model="formdata.spoWorkTel" style="width:40%;"></md-input> *
            <md-input v-model="formdata.spoWorkTelExt" style="width:20%;"></md-input>
          </edit-item>

          <edit-item title="银行卡号 ">
            <md-input v-model="formdata.spoBankAccount"></md-input>
          </edit-item>

          <edit-item title="银行预留手机号 ">
            <md-input v-model="formdata.spoBankMobile"></md-input>
          </edit-item>

        </div>

      </md-card-content>
    </md-card>

    <md-card>
      <md-card-header :data-background-color="dataBackgroundColor">
        <h5 class="title">驾驶员信息</h5>
      </md-card-header>

      <md-card-content>
        <div class="md-layout">

          <edit-item title="车辆主驾驶人" edittype="S">
            <select v-model="formdata.finCarDriver">
              <option v-for="option in g_mlist('31')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="实际用车人姓名">
            <md-input v-model="formdata.finOfferDealer"></md-input>
          </edit-item>

          <edit-item title="驾照类型" edittype="S">
            <select v-model="formdata.finDriverType">
              <option v-for="option in g_mlist('42')" v-bind:value="option.itemvalue" :key="option.itemvalue">
                {{ option.itemcontent }}
              </option>
            </select>
          </edit-item>

          <edit-item title="驾驶证号码">
            <md-input v-model="formdata.finDriverNo"></md-input>
          </edit-item>
        </div>
      </md-card-content>
    </md-card>
  </div>
</template>
<script>
import LabelItem from './Unit/LabelItem.vue'
import EditItem from './Unit/EditItem.vue'

export default {
  components: {
    'label-item': LabelItem,
    'edit-item': EditItem
  },
  data () {
    return {
    }
  },
  props: {
    dataBackgroundColor: {
      type: String,
      default: ''
    },
    formdata: {}
  },
  watch: {
  },
  mounted: function () {
  }
}

</script>
<style>

</style>
